define([
  'dojo/_base/declare'
  'dijit/_WidgetBase'
  'dijit/_OnDijitClickMixin'
  'dijit/_TemplatedMixin'
#  'dijit/_WidgetsInTemplateMixin'
#  'dijit/_form/Button'
  'dojo/text!./templates/SomeWidget.html'
], (declare, _WidgetBase, _OnDijitClickMixin, _TemplatedMixin, template)->
#  console?.log template
  declare([_WidgetBase, _OnDijitClickMixin, _TemplatedMixin], {
#   set our template
    templateString: template
#   some properties
    baseClass: "someWidget"
    title: "", # we'll set this from the widget def

#    define an onClick handler
    _onClick: ()->
      alert "button clicked."

    postCreate: ()->
#      console?.log @title
      @titleNode.innerHTML = @title
  })
)